package trading.ctm.yunjing.module.information.adapter

import android.view.View
import cc.vv.lkbasecomponent.base.ui.adapter.LKBaseSingleAdapter
import cc.vv.lkbasecomponent.base.ui.adapter.viewholder.LKBaseViewHolder
import trading.ctm.yunjing.R

/**
 * @desc 资讯
 * @author zouxiaorui
 * @date  2018/8/23
 */
class InformationAdapter : LKBaseSingleAdapter<String, LKBaseViewHolder> {

    constructor(resId: Int, data: List<String>): super(resId, data)

    override fun convert(helper: LKBaseViewHolder?, item: String?) {
        super.convert(helper, item)

        if(mData.size == helper!!.adapterPosition){
            helper.getView<View>(R.id.view_hf_information_item_line).visibility = View.INVISIBLE
        }else{
            helper.getView<View>(R.id.view_hf_information_item_line).visibility = View.VISIBLE
        }
    }

}